using HedgehogTeam.EasyTouch;
using UnityEngine;

public class BtnAttackController : MonoBehaviour
{
	public GameObject Player;

	private void OnEnable()
	{
		EasyTouch.On_TouchDown += BtnAttack;
	}

	private void OnDisable()
	{
		EasyTouch.On_TouchDown -= BtnAttack;
	}

	private void BtnAttack(Gesture gesture)
	{
		if (gesture.pickedObject != null && gesture.pickedObject == base.gameObject)
		{
			Player.GetComponent<PlayerController>().OnclickAttack();
		}
	}
}
